package com.example.house_manager;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Spinner;

public class HouseActivity extends Activity {

	private Spinner btn_type;
	private Button btn_changCity;
	private Button btn_map;
	private Button btn_search;

	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_house);

		btn_type = (Spinner) findViewById(R.id.type_button_house);

		btn_changCity = (Button) findViewById(R.id.changeCity_button);
		btn_changCity.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HouseActivity.this, CityActivity.class);
				startActivity(intent);
			}
		});

		btn_map = (Button) findViewById(R.id.map_button);
		btn_map.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HouseActivity.this, MapActivity.class);
				startActivity(intent);
			}
		});

		btn_search = (Button) findViewById(R.id.search_button);
		btn_search.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.setClass(HouseActivity.this, SearchActivity.class);
				startActivity(intent);
			}
		});
	}

}
